<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemAreas extends \App\Utils\CreateMigration
{
    function columns(Blueprint $table)
    {
        $table->unsignedBigInteger('pid')->default(1)->comment('查询次数');
        $table->string('name')->default('')->comment('名称');
        $table->unsignedTinyInteger('level')->default(1)->comment('层级');
        $table->string('short')->default('')->comment('简称');
        $table->string('lng')->default('')->comment('坐标');
        $table->string('lat')->default('')->comment('坐标');
        $table->decimal('sort')->default(99)->comment('排序');
        $table->string('pinyin')->nullable()->comment('拼音');
        $table->string('is_show')->default('')->comment('是否显示');
        $table->index(['pid'], 'index_pid');
    }

    function tableInfo()
    {
        return ['system__areas', '系统-城市'];
    }
}

